<?php
/**
 * @link http://cn2.php.net/manual/en/migration54.incompatible.php
 * @version $Id: 8_arr_str.php 211 2012-03-02 10:56:14Z horseluke@126.com $
 */

/*
8. Converting an array to a string will now generate an E_NOTICE 
level error, but the result of the cast will still be the string "Array".


PHP 5.3(5.2):
Array
Array
Array

PHP 5.4:
Notice: Array to string conversion in D:\htdoc_custom\php_5_4\8_arr_str.php on l
ine 23
Array

Notice: Array to string conversion in D:\htdoc_custom\php_5_4\8_arr_str.php on l
ine 27
Array

Notice: Array to string conversion in D:\htdoc_custom\php_5_4\8_arr_str.php on l
ine 31
Array

*/
error_reporting(E_ALL);

$k = array(1);

echo $k;

echo "\r\n";

echo strval($k);

echo "\r\n";

echo (string)$k;